class code3 {
    public int maxDepth(Node root) {
        if(root == null) return 0;
        int ret = 0;

        for(Node x:root.children) {
            int l = maxDepth(x);
            ret = Math.max(ret,l);
        }

        return ret+1;
    }
}